home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir35 / 2xcopy.zip / START.BAT < prev    next >
DOS Batch File  |  1994-05-07  |  8KB  |  209 lines

  1. @echo off
  2. goto start
  3.                              ┌────────────
  4.                              │  START.BAT █
  5.                               ▄▄▄▄▄▄▄▄▄▄▄▄█
  6.  
  7.                        Fri  05-06-1994  12:26:41
  8.  
  9.  
  10.                     COMMAND:   START
  11.  
  12.                             (no parameters)
  13.  
  14.      Trying to make a smart though simple install program for Trakker
  15.      Version 4.03 and other programs that require installation from a
  16.      floppy drive to a known directory on C: Drive.
  17.  
  18.      The sequence:
  19.  
  20.      1.   Use HELP.BAT to display a HELP.TXT file if you wish. If not
  21.           start program by typing START.BAT
  22.  
  23.      2.   START.BAT
  24.  
  25.           displays a request to type in "A" or "B"
  26.  
  27.      3.   EDIT2.EXE accepts keyboard input to run batch file A.BAT or
  28.           B.BAT
  29.  
  30.      4.   A.BAT or B.BAT runs to change to A: or B: Drive then restarts
  31.           START.BAT
  32.  
  33.      5.   Makes C:\TRAKKER3 Directory if it doesn't exist
  34.  
  35.      6.   Use XCOPY.EXE to copy all files to that directory
  36.  
  37.      7.   Check IF ERRORLEVEL for success or failure
  38.  
  39.      8.   Save list of files copied successfully in FILE(S).TXT and
  40.           display that file list with READ.COM
  41.  
  42.      John De Palma on CompuServe 76076,571
  43.  
  44. :start
  45. if "%1"=="A" goto ADrive
  46. if "%1"=="a" goto ADrive
  47. if "%1"=="B" goto BDrive
  48. if "%1"=="b" goto BDrive
  49. if not "%2"=="" goto HelpText
  50. cls
  51. echo    ╒══════════════════════════════════════════════════════════════════╕
  52. echo    │                         INSTALL PROGRAM                          │
  53. echo    │                                                                  │
  54. echo    │                          TRAKKER 4.03                            │
  55. echo    │                                                                  │
  56. echo    │     1.   TYPE:  This Drive letter (A or B) in the edit box       │
  57. echo    │     2.   PRESS: {Enter}                                          │
  58. echo    ╘══════════════════════════════════════════════════════════════════╛
  59. echo 
  60. call edit2.exe
  61. goto End
  62. :ADrive
  63. a:
  64. if not exist c:\trakker3\nul md c:\trakker3
  65. echo.
  66. echo                     Working.....
  67. echo.
  68. echo                     Reading and Copying Files
  69. echo                    ╔════════════════════════════════════════╗ > file(s).txt
  70. echo                    ║     FILES COPIED TO C:\TRAKKER3 ARE:   ║ >> file(s).txt
  71. echo                    ╚════════════════════════════════════════╝ >> file(s).txt
  72.  
  73. rem make sure you put the trailing slash in the directory name
  74. rem select the files you want copied by using wild cards ie:
  75. rem use multiple command lines to copy these files
  76. rem xcopy a:\*.exe
  77. rem xcopy a:\*.txt
  78. xcopy a:\*.* c:\trakker3\ >> file(s).txt
  79. if errorlevel 5 if not errorlevel 6 goto ERROR5
  80. if errorlevel 4 if not errorlevel 5 goto ERROR4
  81. if errorlevel 3 if not errorlevel 4 goto ERROR3
  82. if errorlevel 2 if not errorlevel 3 goto ERROR2
  83. if errorlevel 1 if not errorlevel 2 goto ERROR1
  84. if errorlevel 0 if not errorlevel 1 goto ERROR0
  85. pause
  86. :BDrive
  87. b:
  88. if not exist c:\trakker3\nul md c:\trakker3
  89. echo.
  90. echo                     Working.....
  91. echo.
  92. echo                     Reading and Copying Files
  93. echo                    ╔════════════════════════════════════════╗ > file(s).txt
  94. echo                    ║     FILES COPIED TO C:\TRAKKER3 ARE:   ║ >> file(s).txt
  95. echo                    ╚════════════════════════════════════════╝ >> file(s).txt
  96.  
  97. rem make sure you put the trailing slash in the directory name
  98. rem select the files you want copied by using wild cards ie:
  99. rem use multiple command lines to copy these files
  100. rem xcopy b:\*.exe
  101. rem xcopy b:\*.txt
  102. xcopy b:\*.* c:\trakker3\ >> file(s).txt
  103. if errorlevel 5 if not errorlevel 6 goto ERROR5
  104. if errorlevel 4 if not errorlevel 5 goto ERROR4
  105. if errorlevel 3 if not errorlevel 4 goto ERROR3
  106. if errorlevel 2 if not errorlevel 3 goto ERROR2
  107. if errorlevel 1 if not errorlevel 2 goto ERROR1
  108. if errorlevel 0 if not errorlevel 1 goto ERROR0
  109. pause
  110. :ERROR5
  111. echo 
  112. cls
  113. echo.
  114. echo                    ┌──────────────────────────────────────┐
  115. echo                    │                ERROR #5              │
  116. echo                    │                                      │
  117. echo                    │        Disk is Write Protected       │
  118. echo                    │                                      │
  119. echo                    │        CORRECT and try again         │
  120. echo                    │                                      │
  121. echo                    └──────────────────────────────────────┘
  122. echo.
  123. pause
  124. goto End
  125. :ERROR4
  126. echo 
  127. cls
  128. echo.
  129. echo                    ┌──────────────────────────────────────┐
  130. echo                    │                ERROR #4              │
  131. echo                    │                                      │
  132. echo                    │   Multiple Causes; Invalid Drive     │
  133. echo                    │   Out of Memory; No disk space, etc  │
  134. echo                    │        CORRECT and try again         │
  135. echo                    │                                      │
  136. echo                    └──────────────────────────────────────┘
  137. echo.
  138. pause
  139. goto End
  140. :ERROR3
  141. echo 
  142. cls
  143. echo.
  144. echo                    ┌──────────────────────────────────────┐
  145. echo                    │                ERROR #3              │
  146. echo                    │                                      │
  147. echo                    │    Undefined.... What's goin' on???  │
  148. echo                    │                                      │
  149. echo                    │        CORRECT and try again         │
  150. echo                    │                                      │
  151. echo                    └──────────────────────────────────────┘
  152. echo.
  153. pause
  154. goto End
  155. :ERROR2
  156. echo 
  157. cls
  158. echo.
  159. echo                    ┌──────────────────────────────────────┐
  160. echo                    │                ERROR #2              │
  161. echo                    │                                      │
  162. echo                    │        User terminated XCOPY.EXE     │
  163. echo                    │                                      │
  164. echo                    │        Ctrl + C pressed by user      │
  165. echo                    │                                      │
  166. echo                    └──────────────────────────────────────┘
  167. echo.
  168. pause
  169. goto End
  170. :ERROR1
  171. echo 
  172. cls
  173. echo.
  174. echo                    ┌──────────────────────────────────────┐
  175. echo                    │                ERROR #1              │
  176. echo                    │                                      │
  177. echo                    │        No files found to copy        │
  178. echo                    │                                      │
  179. echo                    │        CORRECT and try again         │
  180. echo                    │                                      │
  181. echo                    └──────────────────────────────────────┘
  182. echo.
  183. pause
  184. goto End
  185. :ERROR0
  186. echo 
  187. cls
  188. echo.
  189. echo                    ┌──────────────────────────────────────┐
  190. echo                    │               SUCCESS!!!             │
  191. echo                    │                                      │
  192. echo                    │        TRAKKER Files copied          │
  193. echo                    │                                      │
  194. echo                    │        to C:\TRAKKER3 Directory      │
  195. echo                    │                                      │
  196. echo                    │        Files Copied will now         │
  197. echo                    │        be listed                     │
  198. echo                    └──────────────────────────────────────┘
  199. echo.
  200. pause
  201. cls
  202. read file(s).txt/n
  203. goto End
  204. :HelpText
  205. read help.txt/n
  206. start.bat
  207. goto End
  208. :End
  209.